package cn.iocoder.yudao.module.reading.controller.app.punch.vo;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.time.LocalDate;
import java.util.List;

/**
 * 学习打卡记录 Response VO
 *
 * @author 芋道源码
 */
@Schema(description = "用户 APP - 学习打卡记录 Response VO")
@Data
public class PunchRecordRespVO {

    @Schema(description = "打卡记录ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
    private Long id;

    @Schema(description = "打卡日期", requiredMode = Schema.RequiredMode.REQUIRED, example = "2024-01-06")
    private LocalDate punchDate;

    @Schema(description = "阅读心得内容", requiredMode = Schema.RequiredMode.REQUIRED, example = "今天读了很有趣的故事")
    private String commentText;

    @Schema(description = "当日阅读绘本数量", requiredMode = Schema.RequiredMode.REQUIRED, example = "3")
    private Integer bookCount;

    @Schema(description = "累计打卡天数", requiredMode = Schema.RequiredMode.REQUIRED, example = "15")
    private Integer dayCount;

    @Schema(description = "当日阅读时长（秒）", requiredMode = Schema.RequiredMode.REQUIRED, example = "900")
    private Integer readingTime;

    @Schema(description = "是否公开显示", requiredMode = Schema.RequiredMode.REQUIRED, example = "true")
    private Boolean isPublic;

    @Schema(description = "阅读的绘本列表")
    private List<PunchBookVO> books;

    @Schema(description = "用户信息")
    private UserInfoVO userInfo;

    @Schema(description = "是否已关注该用户", example = "false")
    private Boolean isFollowed;

    @Schema(description = "创建时间", example = "2024-01-06T10:30:00")
    private String createTime;

    @Schema(description = "更新时间", example = "2024-01-06T10:30:00")
    private String updateTime;

    @Schema(description = "用户信息")
    @Data
    public static class UserInfoVO {
        @Schema(description = "用户ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
        private Long userId;

        @Schema(description = "用户名", requiredMode = Schema.RequiredMode.REQUIRED, example = "张三")
        private String username;

        @Schema(description = "昵称", example = "小张")
        private String nickname;

        @Schema(description = "头像URL", example = "https://example.com/avatar.jpg")
        private String avatar;
    }

    @Schema(description = "打卡绘本信息")
    @Data
    public static class PunchBookVO {
        @Schema(description = "绘本ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
        private Long id;

        @Schema(description = "绘本标题", requiredMode = Schema.RequiredMode.REQUIRED, example = "The Magic Key")
        private String title;

        @Schema(description = "封面图片URL", example = "https://example.com/book1.jpg")
        private String cover;

        @Schema(description = "绘本集ID", example = "1")
        private Long bookSetId;

        @Schema(description = "绘本集标题", example = "牛津树1级")
        private String bookSetTitle;
    }

}
